<?php

use Illuminate\Database\Seeder;

class SettingChannelTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $channel_list = \App\Models\SettingChannel::$CHANNEL_LIST;
        if(is_array($channel_list)){
            $data = array();
            foreach ($channel_list as $k => $v){
                $insertData = array();
                $insertData['channel_code'] = $k;
                $insertData['channel_name'] = $v;
                $data[] = $insertData;
            }
            DB::table('setting_channels')->insert($data);
        }

    }
}
